# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: team/kde <bribbers@disroot.org>

# The group tag is just to easily find this APKBUILD by some scripts for automation
# group=kde-mobile
pkgname=plasma-phonebook
pkgver=23.01.0
pkgrel=3
pkgdesc="Contacts application which allows adding, modifying and removing contacts"
# armhf blocked by extra-cmake-modules
arch="all !armhf"
url="https://invent.kde.org/plasma-mobile/plasma-phonebook"
license="LicenseRef-KDE-Accepted-GPL"
depends="
	kirigami-addons
	kirigami2
	kpeoplevcard
	qt5-qtbase-sqlite
	qt5-qtquickcontrols
	"
makedepends="
	extra-cmake-modules
	kcontacts5-dev
	kcoreaddons5-dev
	kirigami-addons-dev
	kirigami2-dev
	kpeople5-dev
	kpeoplevcard-dev
	qt5-qtbase-dev
	qt5-qtdeclarative-dev
	qt5-qtquickcontrols2-dev
	qt5-qtsvg-dev
	samurai
	"
_repo_url="https://invent.kde.org/plasma-mobile/plasma-phonebook.git"
source="https://download.kde.org/stable/plasma-mobile/$pkgver/plasma-phonebook-$pkgver.tar.xz"
subpackages="$pkgname-lang"
options="!check" # No tests

build() {
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=RelWithDebInfo \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib
	cmake --build build
}

check() {
	ctest --test-dir build --output-on-failure
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
644ebef1bb9ddbbe7b096ff9079e1ebb53d70127b62d52eb8294fb72696a1668307be981b5aaf431cd89db5080d869f9bb6e470f882401d45fcd2592760d60d6  plasma-phonebook-23.01.0.tar.xz
"
